package com.zb.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.entity.*;
import com.zb.mapper.ZjWorkTeamMapper;
import com.zb.mapper.ZjWorkThirdPushDataMapper;
import com.zb.result.PageUtil;
import com.zb.service.ZjWorkClientStrategyEmpService;
import com.zb.service.ZjWorkTeamEmpService;
import com.zb.service.ZjWorkTeamService;
import com.zb.service.ZjWorkThirdPushDataService;
import com.zb.vo.WorkTeamEmpVo;
import com.zb.vo.WorkTeamVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * <p>
 * 工单客服组表 服务实现类
 * </p>
 *
 * @author WEN
 * @since 2023-09-12
 */
@Log4j2
@Service
public class ZjWorkThirdPushDataServiceImpl extends ServiceImpl<ZjWorkThirdPushDataMapper, ZjWorkThirdPushData> implements ZjWorkThirdPushDataService {

    @Override
    public void save(Long custAccId, Integer type, String workNo, String data) {
        try {
            ZjWorkThirdPushData pushData = new ZjWorkThirdPushData();
            pushData.setId(IdWorker.getId());
            pushData.setCustAccId(custAccId);
            pushData.setType(type);
            pushData.setWorkNo(workNo);
            pushData.setData(data);
            this.save(pushData);
        }catch (Exception e) {
            log.info("添加数据记录失败：{}", data);
        }
    }
}
